package com.boot.service;

import com.boot.dao.UserDao;
import com.boot.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    UserDao userDao;

    public Boolean login(User user) {
        return userDao.getUser(user).size()==1;
    }

    public Boolean save(User user) {
        return userDao.save(user);
    }
}
